xquery version "1.0";
<results>
  {
    for $b in doc("book_p2.xml")/catalog/book,
        $t in $b/title,
        $p in $b/price
    order by $b/genre, $t
    return
        <book>
            { $t }    
            { $p}
        </book>
  }
</results>